#ifndef GAMESTATE_MAIN_MAIN_H
#define GAMESTATE_MAIN_MAIN_H


#include "Engine/Sense.h"
#include "Engine/Reason.h"
#include "Engine/Visual.h"
#include "Interface/Menu.h"
#include "Engine/Resource/Graphic.h"
#include "SDL.h"
#include <string>

namespace Engine { class Backbone; } 
namespace GameState { namespace Main { class MainEntry; }  } 
namespace Gameplay { class Play; } 
namespace Engine { namespace Synaptic { class Sound; }  } 
namespace GameState { template<typename T> class DataStorage; } 

namespace GameState {

namespace Main {

class Main : public Engine::Sense, public Engine::Reason, public Engine::Visual {
  private:
	Gameplay::Play * actualPlay; // The running playlevel. I'm not happy with this being static...	

	Interface::Menu mainMenu; 
	Main(); 

  public:
	~Main(); 
	virtual void pulse(int delta); 
	inline virtual void exit(); 
	virtual Engine::Resource::GraphicList display(); // Asks for generation of a graphical model to be displayed
	void keyDown(SDLKey sym, SDLMod mod, Uint16 unicode); 
	static inline Main * raise(); 

  private:
	static Main * singleInstance; 
	std::string levelName; // Name of the loaded level
	bool hardMode; 
    enum MenuIndex {
    	PAUSEMENU_MAINMENU = 0,
    	PAUSEMENU_RESTART,
    	PAUSEMENU_QUIT

    };

};
inline void Main::exit() {
}

inline Main * Main::raise()
{
  if (singleInstance == NULL) singleInstance = new Main();
  return singleInstance;
}


} // namespace GameState::Main

} // namespace GameState
#endif
